package com.ssps.front.rent.service.impl;

import com.ssps.entity.Commission;
import com.ssps.front.rent.service.LessorUserCommissionService;
import com.ssps.mapper.CommissionMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

/**
 * @author lg
 * @time 2020/07/30 17:31:34
 */
@Service
public class LessorUserCommissionServiceImpl implements LessorUserCommissionService {

    @Autowired
    CommissionMapper commissionMapper;

    @Override
    public List<Commission> finAllCommission() {
        List<Commission> commissionList= commissionMapper.selectByExample (null);
        List<Commission> list=new ArrayList<> ();
                  for (Commission c:commissionList){
                       if(c.getStatus ().equals ("启用")){
                             list.add (c);
                       }
                  }
        return list;
    }
}
